using System;
namespace DaphneTranslator
{
	public enum enumRenamingMode { ChangeAsociatedFiles, CreateNewAsociation }
	
	public partial class FilePropertiesDialog : Gtk.Dialog
	{
		public FilePropertiesDialog ()
		{
			this.Build ();
			
			buttonCancel.Clicked += HandleCancel;
			buttonOk.Clicked += HandleOK;
		}

		void HandleOK (object sender, EventArgs e)
		{
			Respond (Gtk.ResponseType.Ok);
		}

		void HandleCancel (object sender, EventArgs e)
		{
			Respond (Gtk.ResponseType.Cancel);
		}
		
		public string RootPath { 
			get {
				return wdgPath.RootPath;
			}
			set {
				wdgPath.RootPath = value;
				wdgPath.SelectRelativePath = true;
			}
		}
		
		public string RelativePath {
			get {
				return wdgPath.GetPath ();
			}
			set {
				wdgPath.SetPath(value);
			}		
		}
		
		public string Filename {
			get {
				return entryFilename.Text.Trim ();
			}
			set {
				entryFilename.Text = value;
			}
		}
		
		public enumRenamingMode RenamingMode {
			get {
				if (radiobutton1.Active == true)
					return enumRenamingMode.ChangeAsociatedFiles;
				else
					return enumRenamingMode.CreateNewAsociation;
			}
			set {
				if (value == enumRenamingMode.ChangeAsociatedFiles)
					radiobutton1.Active = true;
				else
					radiobutton2.Active = true;
			}
		}		
	}	
}

